<!-- 公共头 -->
<%
var path = request.ContextPath;
var basePath = request.Scheme +"://"+request.ServerName+":"+request.ServerPort+path+"/";
var staticPath = basePath + "static";
%>
<link rel="import" href="${staticPath}/page/common/header.html">
<meta charset="UTF-8">
<link rel="stylesheet" href="/static/css/main.css">


<body class="layui-layout-body">
    <div class="layui-layout layui-layout-admin">
        <div class="layui-header">
            <div class="layui-logo">
                <img src="${staticPath}/img/logo.svg" class="layui-nav-img">小程序管理系统
            </div>
            <!-- 头部区域（可配合layui已有的水平导航） -->
            <ul class="layui-nav layui-layout-left">
                <li class="layui-nav-item">
                    <a href='javascript:;'>消息<span class="layui-badge">9</span></a>
                </li>
                <li class="layui-nav-item">
                    <a href="javascript:;">用户管理</a>
                    <dl class="layui-nav-child">
                        <dd><a href='javascript:;'>角色管理</a></dd>
                        <dd><a href='javascript:;'>用户管理</a></dd>
                        <dd><a href='javascript:;'>授权管理</a></dd>
                    </dl>
                </li>
            </ul>
            <ul class="layui-nav layui-layout-right">
                <li class="layui-nav-item">
                    <a href="javascript:;">
                        <img src="${staticPath}/img/wechat.png" class="layui-nav-img">
                        ${session.user.name}
                    </a>
                    <dl class="layui-nav-child">
                        <dd><a  href='javascript:;'>基本资料</a></dd>
                        <dd><a href='javascript:;'>安全设置</a></dd>
                    </dl>
                </li>
                <li class="layui-nav-item"><a href='/logout'>退出</a></li>
            </ul>
        </div>

        <div class="layui-side layui-bg-black">
            <div class="layui-side-scroll">
                <!-- 左侧导航区域（可配合layui已有的垂直导航） -->
                <ul class="layui-nav layui-nav-tree"  lay-filter="test">
                    <% for(rs in session.user.resources){ %>
                        <li class="layui-nav-item">
                            <a href="javascript:;">${rs.name}</a>
                            <dl class="layui-nav-child">
                                <% for(r in rs.sysytemResources){ %>
                                    <dd class="icon-box">
                                        <i class="fa fa-address-book-o"></i>
                                        <a class="icon-a" href="javascript:;" url="${r.url}" onclick="forward(this)">${r.name}</a>
                                    </dd>
                                <%  } %>
                            </dl>
                        </li>
                    <%  } %>
                </ul>
            </div>
        </div>

        <div class="layui-body" >
            <p id="text-title">欢迎</p>
            <hr class="layui-bg-green">
            <div class="center" id="main-body">

            </div>
        </div>

        <div class="layui-footer">
            <!-- 底部固定区域 -->
            © 小程序后台管理
        </div>
    </div>
</body>

<!-- 公共页脚 -->
<link rel="import" href="${staticPath}/page/common/footer.html">